import request from '@/utils/request'
// 字典列表
export function DictList(data) {
  return request({
    url: '/system/dict/type/list',
    method: 'post',
    data
  })
}
// 字典新增key
export function DictSaveSysDictType(data) {
  return request({
    url: '/system/dict/type/saveSysDictType',
    method: 'post',
    data
  })
}
// 字典修改key
export function DictUpdateSysDictType(data) {
  return request({
    url: '/system/dict/type/updateSysDictType',
    method: 'post',
    data
  })
}
// 字典数据删除
export function DictDelete(data) {
  return request({
    url: '/system/dict/data/delete',
    method: 'post',
    data
  })
}

// 字典key删除
export function DictDelDictIds(data) {
  return request({
    url: '/system/dict/type/delDictIds',
    method: 'post',
    data
  })
}

// 字典数据列表
export function DictDetailsList(data) {
  return request({
    url: '/system/dict/data/list',
    method: 'post',
    data
  })
}
// 添加字典数据列表
export function DictDetailsSaveSysDictData(data) {
  return request({
    url: '/system/dict/data/saveSysDictData',
    method: 'post',
    data
  })
}
// 字典数据del
export function DictDetailsdelete(data) {
  return request({
    url: '/system/dict/data/delete',
    method: 'post',
    data
  })
}
// 字典数据更新
export function DetailsUpdateeSysDictData(data) {
  return request({
    url: '/system/dict/data/updateeSysDictData',
    method: 'post',
    data
  })
}
// 获取开启的字典
export function getTypeDictType(value) {
  const dictType = value.toUpperCase()
  return request({
    url: '/system/dict/data/dictTypeIsOpen',
    method: 'post',
    data: {
      dictType
    }
  })
}
